import java.util.*;
class Child{
    private String name;
    private int age;
    private String gender;
    private int height;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Child(String name, int height, String gender, int age) {
        this.name = name;
        this.height = height;
        this.gender = gender;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Child{" +
                "age=" + age +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", height=" + height +
                '}';
    }
}
class BodyCheck{
    private int standardHeight;
    public void checkHeight(Child c) throws heightException{
        calcStandardHeight(c);
        if(c.getHeight()<standardHeight){
            int cha=standardHeight-c.getHeight();
            throw new heightException(c.getName()+"小朋友身高不达标,还差"+cha+"厘米");
        }
        //请按要求将代码补充完整
    }
    //M表示男，F表示女
    public void calcStandardHeight(Child c) {
        if(c.getGender().equals("M")){
            standardHeight=c.getAge()*6+75;
        }
        else{
            standardHeight=c.getAge()*6+70;
        }
    }
}

class heightException extends Exception{
    private String msg;

    public heightException(String msg) {
        this.msg = msg;
    }

    @Override
    public String toString() {
        return msg;
    }
}

public class Main{

    public static void main(String[] args)  {

        int choice = -1;  //代码结构检查选项，请严格按题目要求编写代码即可
        Scanner sc=new Scanner(System.in);
        choice = sc.nextInt();  //每个测试用例第1行输入均为代码结构检查选项
        sc.nextLine();   //读入代码结构检查选项输入后的回车符，请忽略

        String[] input;
        input=sc.nextLine().split(" ");
        Child c1=new Child(input[0],Integer.parseInt(input[1]),input[2],Integer.parseInt(input[3]));
        //结构检查代码
        BodyCheck check=new BodyCheck();
        System.out.println(c1);
        try {
            check.checkHeight(c1);
        }
        catch (heightException e) {
            System.out.println(e);
        }
    }

}
//请在此处填入完整的Child类、BodyCheck类和heightException类代码